package com.mf.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.alibaba.excel.annotation.format.NumberFormat;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.mf.converter.EasyExcelGenderConverter;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author: lmf
 * @Create: 2024/6/25 16:03
 * Description: 导出测试类
 */
@Data
@ContentRowHeight(40)
@ColumnWidth(30)
public class OutExcelVo implements Serializable {
    /**
     * 姓名
     */
    @ExcelProperty(value = {"基本信息","姓名"})
    private String name;
    /**
     * 性别
     */
    @ExcelProperty(value = {"基本信息","性别"}, converter = EasyExcelGenderConverter.class)
    private Integer gender;
    /**
     * 日期
     */
    @ColumnWidth(50)
    @ExcelProperty(value = {"基本信息","日期"})
    @DateTimeFormat("yyyy年MM月dd日HH时mm分ss秒")
    private Date date;
    /**
     * 数量
     */
    @ExcelProperty(value = {"其他","数量"})
    @NumberFormat("￥#.##")
    private BigDecimal quantity;
    /**
     * id
     */
//    @ExcelIgnore // 不需要导出字段
    private Integer id;
}
